//
//  StringWithHeight.m
//  zishiying
//
//  Created by mac on 15/9/6.
//  Copyright (c) 2015年 lanou3g.com蓝欧科技. All rights reserved.
//

#import "StringWithHeight.h"

@implementation StringWithHeight
+ (CGFloat)HeightWithText:(NSString *)text width:(CGFloat)width font:(UIFont *)font
{
    CGSize size = CGSizeMake(width, 3000);
    CGRect rect = [text boundingRectWithSize:size options:NSStringDrawingUsesLineFragmentOrigin attributes:@{NSFontAttributeName:font} context:nil];
    return rect.size.height;
}
@end
